/* WARNING!!  This message format is in pre-alpha development.  There is a high
 * probability any of these formats will change, which will cause prior
 * versions to no longer work.  You are more than welcome to setup to help us
 * develop and/or test, but it is NOT recommend you use the server or message
 * formats for production purposes until we at least reach beta development.
 * Thank you.
 */


syntax = "proto3";
import "time.proto";
import "enums.proto";


/* Clip: This message contains actual sound data, be it audio or MIDI.  Audio
 * will be sent/received/stored in .flac format to remain lossless yet reduce
 * bandwidth/storage space consumed.  Patches for DAWs that cannot read flac
 * directly will need to convert the .flac files to .wav files before storing
 * locally.
 */

message Clip {
	string uri = 1;
	string name = 2;		// This is the filename of the clip w/o extension.
	DataType type = 3;
	bytes data = 4;
}


/* ClipTime: Used for the collection in the Track that keeps track of what
 * clips are used where.  It includes start/stop times, both from a Track
 * perspective and a Clip perspective.
 */

message ClipTime {
	string uri = 1;
	string clip_uri = 2;
	Time track_start_time = 3;
	Time track_end_time = 4;
	Time clip_start_time = 5;
	Time clip_end_time = 6;
}

